import 'package:awak/common/repository/room_repository.dart';
import 'package:awak/common/repository/comment_repository.dart';
import 'package:awak/common/repository/topic_repository.dart';
import 'package:awak/common/repository/content_repository.dart';
import 'package:awak/common/repository/review_repository.dart';
import 'package:awak/common/repository/chat_repository.dart';
import 'package:awak/common/repository/friendship_repository.dart';
import 'package:awak/common/repository/plan_repository.dart';
import 'package:awak/common/repository/today_goal_repository.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:awak/bloc/auth/auth_bloc.dart';
import 'package:awak/common/repository/user_repository.dart';
import 'package:flutter/widgets.dart';

class AwakBlocProvider extends StatelessWidget {
  final Widget child;
  const AwakBlocProvider({Key? key, required this.child}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [
        BlocProvider<AwakBloc>(
          create: (_) => AwakBloc(
            UserRepository(),
            RoomRepository(),
            CommentRepository(),
            TopicRepository(),
            ContentRepository(),
            ReviewRepository(),
            ChatRepository(),
            FriendshipRepository(),
            PlanRepository(),
            TodayGoalRepository(),
          ),
        ),
      ],
      child: child,
    );
  }
}
